package cn.zhentao.charge.domain;

import java.util.Date;
import com.fasterxml.jackson.annotation.JsonFormat;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import com.ruoyi.common.core.annotation.Excel;
import com.ruoyi.common.core.web.domain.BaseEntity;

/**
 * 用户优惠券对象 user_coupon
 * 
 * @author ruoyi
 * @date 2025-05-15
 */
public class UserCoupon extends BaseEntity
{
    private static final long serialVersionUID = 1L;

    /** 表主键id */
    private Integer id;

    /** 用户id */
    @Excel(name = "用户id")
    private Integer userId;

    /** 优惠券id */
    @Excel(name = "优惠券id")
    private Integer couponId;

    /** 有效期 */
    @JsonFormat(pattern = "yyyy-MM-dd")
    @Excel(name = "有效期", width = 30, dateFormat = "yyyy-MM-dd")
    private Date period;

    /** 状态 0未使用 1已使用 */
    @Excel(name = "状态 0未使用 1已使用")
    private Integer status;

    /** 使用时间 */
    @JsonFormat(pattern = "yyyy-MM-dd")
    @Excel(name = "使用时间", width = 30, dateFormat = "yyyy-MM-dd")
    private Date useTime;

    public void setId(Integer id) 
    {
        this.id = id;
    }

    public Integer getId() 
    {
        return id;
    }

    public void setUserId(Integer userId) 
    {
        this.userId = userId;
    }

    public Integer getUserId() 
    {
        return userId;
    }

    public void setCouponId(Integer couponId) 
    {
        this.couponId = couponId;
    }

    public Integer getCouponId() 
    {
        return couponId;
    }

    public void setPeriod(Date period) 
    {
        this.period = period;
    }

    public Date getPeriod() 
    {
        return period;
    }

    public void setStatus(Integer status) 
    {
        this.status = status;
    }

    public Integer getStatus() 
    {
        return status;
    }

    public void setUseTime(Date useTime) 
    {
        this.useTime = useTime;
    }

    public Date getUseTime() 
    {
        return useTime;
    }

    @Override
    public String toString() {
        return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
            .append("id", getId())
            .append("userId", getUserId())
            .append("couponId", getCouponId())
            .append("period", getPeriod())
            .append("status", getStatus())
            .append("createTime", getCreateTime())
            .append("useTime", getUseTime())
            .toString();
    }
}
